package com.zxpan.restaurant.persist.dao.impl;

import java.util.HashMap;
import java.util.Map;

import com.zxpan.restaurant.db.model.Hotel;
import com.zxpan.restaurant.persist.dao.HotelDao;


public class HotelDaoImpl extends DaoBase<Hotel> implements HotelDao {

	 private static final String PREFIX = "hotel";

	    public HotelDaoImpl() {
	    	super.setClazz(Hotel.class);
	    	super.setPrefix(PREFIX);
	    }
	
	@Override
	public Hotel getHotel(String hotelId) {
		Map<String, String> param = new HashMap<String, String>();
		Hotel[] hotelArray = super.select(param);
		if(hotelArray != null && 0 != hotelArray.length) {
			return hotelArray[0];
		} else {
			return null;
		}
	}

}
